// import { getCurrentInstance } from 'vue'

// const { proxy } = getCurrentInstance()
import axios from 'axios'

// proxy.axios.post('/api/getProcess',this.postReq).then(response => (console.log(response)))
// .catch(function (error) { // 请求失败处理
//   console.log(error);
// });

export const post = (url,params)=>{
    params = params || {};
    return new Promise((resolve,reject)=>{
        axios.post(url,params).then(response=>{
            console.log(response.data)
            resolve(response.data);
        }).catch(error=>{
            console.log(error);
        })
    })
}